<?php
include_once('../fm/comm.php');
$myt = new thunder();

if(isset($_POST)){
	extract($_POST);
}

$sql = "select * from `ecs_goods` where cat_id=".$cid;
$data = $myt->getAll($sql);
$str = '';
foreach($data as $d){
	$str .= "{'goods_id':'".$d['goods_id']."', 'goods_name':'".$d['goods_name']."'},";
}
$str = rtrim($str, ',');
$str = "[".$str."]";

echo $str;
?>